package com.happyclub.pojo;

import javax.persistence.*;
import java.sql.Time;
import java.util.Objects;

/**
 * @author 高欢
 * @description TODO
 * @date 2019/4/4
 */
@Entity
@Table(name = "TB_LIMIT", schema = "SCOTT", catalog = "")
public class TbLimit {
    private String id;
    private String userid;
    private Time limittime;
    private long days;
    private Time updatetime;
    private Time createtime;

    @Id
    @Column(name = "ID")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "USERID")
    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    @Basic
    @Column(name = "LIMITTIME")
    public Time getLimittime() {
        return limittime;
    }

    public void setLimittime(Time limittime) {
        this.limittime = limittime;
    }

    @Basic
    @Column(name = "DAYS")
    public long getDays() {
        return days;
    }

    public void setDays(long days) {
        this.days = days;
    }

    @Basic
    @Column(name = "UPDATETIME")
    public Time getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Time updatetime) {
        this.updatetime = updatetime;
    }

    @Basic
    @Column(name = "CREATETIME")
    public Time getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Time createtime) {
        this.createtime = createtime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbLimit tbLimit = (TbLimit) o;
        return days == tbLimit.days &&
                Objects.equals(id, tbLimit.id) &&
                Objects.equals(userid, tbLimit.userid) &&
                Objects.equals(limittime, tbLimit.limittime) &&
                Objects.equals(updatetime, tbLimit.updatetime) &&
                Objects.equals(createtime, tbLimit.createtime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, userid, limittime, days, updatetime, createtime);
    }
}
